#ifndef __COMMON_DEBUG_HH__
#define __COMMON_DEBUG_HH__

#define BOOST_ENABLE_ASSERT_HANDLER

#include <exception>

#include <boost/assert.hpp>

namespace Common
{
	namespace Debug
	{
		std::string demangle( const char *name );
		void logBacktrace( int start, int end );

		class AssertionException : public std::exception
		{
			private:
				std::string desc;

			public:
				AssertionException( char const *expr, char const *function, char const *file, long line ) throw();
				virtual ~AssertionException() throw() { };
				virtual const char *what() const throw() { return desc.c_str(); };
		};
	}
}

#endif
